package unimelb.discussiontracker.twitter.web.model;

import java.util.List;

import unimelb.discussiontracker.twitter.common.QueryControl;

public class PaginatedSearchResult<T> {

    private List<T> items;

    private long total;

    private long totalPageNumber;

    private long pageSize;

    private long pageNumber;

    private String sortBy;

    private String sortOrder;

    public PaginatedSearchResult(List<T> items, long total, long totalPageNumber, QueryControl queryControl) {
        super();
        this.items = items;
        this.total = total;
        this.totalPageNumber = totalPageNumber;
        this.pageSize = queryControl.getPageSize();
        this.pageNumber = queryControl.getPageNumber();
        this.sortBy = queryControl.getSortBy();
        this.sortOrder = queryControl.getSortOrder();
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getTotalPageNumber() {
        return totalPageNumber;
    }

    public void setTotalPageNumber(long totalPageNumber) {
        this.totalPageNumber = totalPageNumber;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(long pageNumber) {
        this.pageNumber = pageNumber;
    }

    public String getSortBy() {
        return sortBy;
    }

    public void setSortBy(String sortBy) {
        this.sortBy = sortBy;
    }

    public String getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(String sortOrder) {
        this.sortOrder = sortOrder;
    }

}
